package com.wade.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wade.domain.Student;
import com.wade.service.StudentService;

/**
 * 
 * @company: hua9group
 * @author wdChen
 * @date:2017年6月23日 下午1:39:13
 * @Description:
 */
@Service
public class StudentServiceImpl implements StudentService {

  @Autowired
  private Dao dao;
  
  public Map<String, Object> save(Student student) {
    Map<String, Object> result = new HashMap<String, Object>();
    Student resultStudent = dao.insert(student);
    if (resultStudent != null) {
      result.put("code", 200);
      result.put("msg", "保存成功");
    } else {
      result.put("code", 400);
      result.put("msg", "保存失败");
    }
    return result;
  }

}

